package com.evil.application.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 应用条件组表
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
@TableName(value = "evil_application_judge_agg")
public class ApplicationJudgeAgg implements Serializable {

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 企业id
     */
    @TableField(value = "enterprise_id")
    private Long enterpriseId;

    /**
     * 源类型（1-执行条件聚合）
     */
    @TableField(value = "source_type")
    private Integer sourceType;

    /**
     * 源id
     */
    @TableField(value = "source_id")
    private Long sourceId;

    /**
     * 控件id
     */
    @TableField(value = "control_id")
    private Long controlId;

    /**
     * 控件code
     */
    @TableField(value = "control_code")
    private String controlCode;

    /**
     * 汇总方式（0-无，1-计数，2-求和，3-平均值，4-最大值，5-最小值）
     */
    @TableField(value = "summary_type")
    private Integer summaryType;

    /**
     * 判断符号（0-等于，1-不等于，2-包含，3-不包含，4-属于，5-不属于）
     */
    @TableField(value = "judge_sign")
    private Integer judgeSign;

    /**
     * 匹配类型（1-自定义，2-匹配字段）
     */
    @TableField(value = "matching_type")
    private Integer matchingType;

    /**
     * 目标id（matching_type=2时有值）
     */
    @TableField(value = "target_id")
    private Long targetId;

    /**
     * 筛选值
     */
    @TableField(value = "`values`")
    private String values;

    /**
     * 筛选类型（1-或条件，2-且条件）
     */
    @TableField(value = "judge_type")
    private Integer judgeType;

    /**
     * 上级条件id（且条件时 值有效）
     */
    @TableField(value = "parent_judge_id")
    private Long parentJudgeId;

    /**
     * 源条件id
     */
    @TableField(value = "source_judge_id")
    private Long sourceJudgeId;

    /**
     * 是否已删除(0:否, 1:是)
     */
    @TableField(value = "is_deleted")
    private Integer isDeleted;

    /**
     * 创建人
     */
    @TableField(value = "creator_id")
    private Long creatorId;

    /**
     * 创建人名字
     */
    @TableField(value = "creator_name")
    private String creatorName;

    /**
     * 修改操作人
     */
    @TableField(value = "modifier_id")
    private Long modifierId;

    /**
     * 修改操作人名字
     */
    @TableField(value = "modifier_name")
    private String modifierName;

    /**
     * 创建时间
     */
    @TableField(value = "created")
    private Date created;

    /**
     * 更新时间
     */
    @TableField(value = "updated")
    private Date updated;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_SOURCE_TYPE = "source_type";

    public static final String COL_SOURCE_ID = "source_id";

    public static final String COL_CONTROL_ID = "control_id";

    public static final String COL_CONTROL_CODE = "control_code";

    public static final String COL_SUMMARY_TYPE = "summary_type";

    public static final String COL_JUDGE_SIGN = "judge_sign";

    public static final String COL_MATCHING_TYPE = "matching_type";

    public static final String COL_TARGET_ID = "target_id";

    public static final String COL_VALUES = "values";

    public static final String COL_JUDGE_TYPE = "judge_type";

    public static final String COL_PARENT_JUDGE_ID = "parent_judge_id";

    public static final String COL_SOURCE_JUDGE_ID = "source_judge_id";

    public static final String COL_IS_DELETED = "is_deleted";

    public static final String COL_CREATOR_ID = "creator_id";

    public static final String COL_CREATOR_NAME = "creator_name";

    public static final String COL_MODIFIER_ID = "modifier_id";

    public static final String COL_MODIFIER_NAME = "modifier_name";

    public static final String COL_CREATED = "created";

    public static final String COL_UPDATED = "updated";
}